This is a personal reference workflow for minimizing token usage while maintaining project continuity across Claude Code (Sonnet 4 with file access).
Claude loads CLAUDE.md automatically at session start.
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
Generalized from Karpathy's autoresearch. Same loop, any domain.
An AI agent runs an infinite hill-climbing loop: modify β run β measure β keep or revert β repeat. No human in the loop. Wake up to a TSV of completed experiments.
| {%- set image_count = namespace(value=0) %} | |
| {%- set video_count = namespace(value=0) %} | |
| {%- macro render_content(content, do_vision_count, is_system_content=false) %} | |
| {%- if content is string %} | |
| {{- content }} | |
| {%- elif content is iterable and content is not mapping %} | |
| {%- for item in content %} | |
| {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} | |
| {%- if is_system_content %} | |
| {{- raise_exception('System message cannot contain images.') }} |
| blueprint: | |
| name: Wake-up Light Alarm | |
| description: > | |
| Wake-up Light with sunrise effect. | |
| Uses modern Kelvin scale (e.g., 2200K to 4000K) where low is warm and high is cold. | |
| domain: automation | |
| input: | |
| light_entity: | |
| name: Wake-up light entity | |
| description: The light to control. Turning it off manually will cancel the sunrise. |
Three pi coding agent extensions that add web research tools with custom TUI rendering.
All three tools include custom renderCall / renderResult methods so that:
(Working as of 2025-02-09)
There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.
If the shortcut F12 on Windows or Option + β + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.
| { | |
| "editor.fontSize": 14, | |
| "editor.tabSize": 2, | |
| "editor.formatOnSave": true, | |
| "explorer.confirmDelete": false, | |
| "editor.wordWrap": "on", | |
| "editor.wordWrapColumn": 120, | |
| "javascript.updateImportsOnFileMove.enabled": "always", | |
| "editor.formatOnType": true, | |
| "peacock.favoriteColors": [ |